SYNOLOGY-MAILPLUS-MIB DEFINITIONS ::= BEGIN

IMPORTS
	OBJECT-GROUP, MODULE-COMPLIANCE
		FROM SNMPv2-CONF
	OBJECT-TYPE, Integer32, enterprises, MODULE-IDENTITY
		FROM SNMPv2-SMI
	DisplayString
		FROM SNMPv2-TC;

mailplus MODULE-IDENTITY
	LAST-UPDATED	"202405200000Z"
	ORGANIZATION	"www.synology.com"
	CONTACT-INFO
		 "Synology Inc.
		  Email: snmp@synology.com"
	DESCRIPTION		"Characteristics of the MailPlus Server information"
	::= { synology 201 }

synology	OBJECT IDENTIFIER
	::= { enterprises 6574 }

-- mail count overview
deliveryResult OBJECT IDENTIFIER ::={ mailplus 1 }

deliverySent OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails sent over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 1 }

deliveryReceived OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails received over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 2 }

deliveryBounced OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails bounced over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 3 }

deliveryDeferred OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails deferred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 4 }

deliveryExpired OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails expired over the past 10 minutes on MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 5 }

deliveryForwarded OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails forwarded over the past 10 minutes on MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 6 }

deliveryDeletedInQueue OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails deleted in queue over the past 10 minutes on MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { deliveryResult 7 }

-- threat count
threatEvent OBJECT IDENTIFIER ::={ mailplus 2 }

threatDataProtection OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of MCP (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 1 }

threatDmarc OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of DMARC (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 2 }

threatSpf OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of SPF (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 3 }

threatSpam OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of spam (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 4 }

threatDnsbl OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of DNSBL (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 5 }

threatDkim OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of DKIM (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 6 }

threatMaliciousContent OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of malicious content (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 7 }

threatAttachmentFilter OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of attachment filter (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 8 }

threatVirus OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of viruses (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 9 }

threatBlocklist OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The total number of blacklists (one of the security threats) incidents that occurred over the past 10 minutes on the MailPlus Server. (In an HA setup, numbers are sourced from two servers.)"
	::= { threatEvent 10 }

-- threat count outbound
mailQueue OBJECT IDENTIFIER ::={ mailplus 3 }

queueMaildrop OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails in maildrop queue. (In an HA setup, numbers are sourced from the local server only.)"
	::= { mailQueue 1 }

queueActive OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails in active queue. (In an HA setup, numbers are sourced from the local server only.)"
	::= { mailQueue 2 }

queueIncoming OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails in incoming queue. (In an HA setup, numbers are sourced from the local server only.)"
	::= { mailQueue 3 }

queueDeferred OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails in deferred queue. (In an HA setup, numbers are sourced from the local server only.)"
	::= { mailQueue 4 }

queueHold OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of mails in hold queue. (In an HA setup, numbers are sourced from the local server only.)"
	::= { mailQueue 5 }

-- imap and pop3 count
protocols OBJECT IDENTIFIER ::={ mailplus 4 }

connectionImap OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of connections through IMAP. (In an HA setup, numbers are sourced from the local server only.)"
	::= { protocols 1 }

connectionPop3 OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of connections through POP3. (In an HA setup, numbers are sourced from the local server only.)"
	::= { protocols 2 }

-- smtp count
smtp  OBJECT IDENTIFIER ::={ mailplus 5 }

smtpInbound OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of inbound SMTP connections. (In an HA setup, numbers are sourced from the local server only.)"
	::= { smtp 1 }

smtpOutbound OBJECT-TYPE
	SYNTAX		Integer32(0..2147483647)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The number of outbound SMTP connections. (In an HA setup, numbers are sourced from the local server only.)"
	::= { smtp 2 }

-- service status
serviceStatus  OBJECT IDENTIFIER ::={ mailplus 6 }

-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--         STATUS         |                                                                     EXPLANATION                                                                                     |
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Running (0)            | The service is currently operational and running as expected.                                                                                                       |
-- Not Running (1)        | The service is not currently running and is inactive.                                                                                                               |
-- Dead Pid file (2)      | Although the service is not running, a PID (Process ID) file associated with it exists, indicating a possible issue with the service startup or termination process.|
-- Port Not Listening (3) | The service is running, but the ports it utilizes are not actively listening for connections.                                                                       |
-- Unknow (6)             | The status of the service cannot be determined definitively. It may either be inactive when it should be running, or active when it should be inactive.             |
-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

servicePostfix OBJECT-TYPE
	SYNTAX		Integer32(0..1)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The status of Postfix service ( Running(0), Not Running(1), Dead Pid file(2), Port Not Listening(3), Unknow(6) ). (In an HA setup, this reflects the status of the local server.)"
	::= { serviceStatus 1 }

serviceDovecot OBJECT-TYPE
	SYNTAX		Integer32(0..1)
	MAX-ACCESS	read-only
	STATUS		current
	DESCRIPTION "The status of Dovecot service ( Running(0), Not Running(1), Dead Pid file(2), Port Not Listening(3), Unknow(6) ). (In an HA setup, this reflects the status of the local server.)"
	::= { serviceStatus 2 }


mailplusConformance	OBJECT IDENTIFIER ::= { mailplus 7 }
mailplusCompliances	OBJECT IDENTIFIER ::= { mailplusConformance 1 }
mailplusGroups			OBJECT IDENTIFIER ::= { mailplusConformance 2 }

mailplusCompliance MODULE-COMPLIANCE
	STATUS				current
	DESCRIPTION
						"The compliance statement for mailplus information."
	MODULE				-- this module
	MANDATORY-GROUPS	{ mailplusGroup }
	::= { mailplusCompliances 1 }

mailplusGroup OBJECT-GROUP
	OBJECTS {	deliverySent,
				deliveryReceived,
				deliveryBounced,
				deliveryDeferred,
				deliveryExpired,
				deliveryForwarded,
				deliveryDeletedInQueue,
				threatDataProtection,
				threatDmarc,
				threatSpf,
				threatSpam,
				threatDnsbl,
				threatDkim,
				threatMaliciousContent,
				threatAttachmentFilter,
				threatVirus,
				threatBlocklist,
				queueMaildrop,
				queueActive,
				queueIncoming,
				queueDeferred,
				queueHold,
				connectionImap,
				connectionPop3,
				smtpInbound,
				smtpOutbound,
				servicePostfix,
				serviceDovecot
			}
	STATUS		current
	DESCRIPTION
				"A collection of objects providing basic information
				of an synology mailplus entity."
	::= { mailplusGroups 1 }

END